Integrand size = 21, antiderivative size = 122 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {\left (a^2+2 b^2\right ) \cot (c+d x)}{d}-\frac {2 a b \cot ^2(c+d x)}{d}-\frac {\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 d}-\frac {a b \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3597, 962} \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 d}-\frac {\left (a^2+2 b^2\right ) \cot (c+d x)}{d}-\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {a b \cot ^4(c+d x)}{2 d}-\frac {2 a b \cot ^2(c+d x)}{d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \]
[In]
[Out]
Rule 962
Rule 3597
Rubi steps \begin{align*} \text {integral}& = \frac {b \text {Subst}\left (\int \frac {(a+x)^2 \left (b^2+x^2\right )^2}{x^6} \, dx,x,b \tan (c+d x)\right )}{d} \\ & = \frac {b \text {Subst}\left (\int \left (1+\frac {a^2 b^4}{x^6}+\frac {2 a b^4}{x^5}+\frac {2 a^2 b^2+b^4}{x^4}+\frac {4 a b^2}{x^3}+\frac {a^2+2 b^2}{x^2}+\frac {2 a}{x}\right ) \, dx,x,b \tan (c+d x)\right )}{d} \\ & = -\frac {\left (a^2+2 b^2\right ) \cot (c+d x)}{d}-\frac {2 a b \cot ^2(c+d x)}{d}-\frac {\left (2 a^2+b^2\right ) \cot ^3(c+d x)}{3 d}-\frac {a b \cot ^4(c+d x)}{2 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {2 a b \log (\tan (c+d x))}{d}+\frac {b^2 \tan (c+d x)}{d} \\ \end{align*}
Time = 2.82 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.93 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {2 \cot (c+d x) \left (8 a^2+25 b^2+\left (4 a^2+5 b^2\right ) \csc ^2(c+d x)+3 a^2 \csc ^4(c+d x)\right )+15 b \left (2 a \csc ^2(c+d x)+a \csc ^4(c+d x)+4 a \log (\cos (c+d x))-4 a \log (\sin (c+d x))-2 b \tan (c+d x)\right )}{30 d} \]
[In]
[Out]
Time = 12.76 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.98
method | result | size |
derivativedivides | \(\frac {b^{2} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+2 a b \left (-\frac {1}{4 \sin \left (d x +c \right )^{4}}-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )}{d}\) | \(119\) |
default | \(\frac {b^{2} \left (-\frac {1}{3 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {4}{3 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {8 \cot \left (d x +c \right )}{3}\right )+2 a b \left (-\frac {1}{4 \sin \left (d x +c \right )^{4}}-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\left (\csc ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\csc ^{2}\left (d x +c \right )\right )}{15}\right ) \cot \left (d x +c \right )}{d}\) | \(119\) |
risch | \(\frac {4 a b \,{\mathrm e}^{10 i \left (d x +c \right )}-16 a b \,{\mathrm e}^{8 i \left (d x +c \right )}-\frac {32 i a^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {32 i b^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{3}-\frac {16 i a^{2} {\mathrm e}^{4 i \left (d x +c \right )}}{3}-\frac {80 i b^{2} {\mathrm e}^{4 i \left (d x +c \right )}}{3}+16 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+\frac {64 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{15}+\frac {64 i b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{3}-4 a b \,{\mathrm e}^{2 i \left (d x +c \right )}-\frac {16 i a^{2}}{15}-\frac {16 i b^{2}}{3}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 a b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {2 a b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(226\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (116) = 232\).
Time = 0.27 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.97 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=-\frac {16 \, {\left (a^{2} + 5 \, b^{2}\right )} \cos \left (d x + c\right )^{6} - 40 \, {\left (a^{2} + 5 \, b^{2}\right )} \cos \left (d x + c\right )^{4} + 30 \, {\left (a^{2} + 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left (a b \cos \left (d x + c\right )^{5} - 2 \, a b \cos \left (d x + c\right )^{3} + a b \cos \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 30 \, {\left (a b \cos \left (d x + c\right )^{5} - 2 \, a b \cos \left (d x + c\right )^{3} + a b \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) - 30 \, b^{2} - 15 \, {\left (2 \, a b \cos \left (d x + c\right )^{3} - 3 \, a b \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{30 \, {\left (d \cos \left (d x + c\right )^{5} - 2 \, d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )} \]
[In]
[Out]
\[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{2} \csc ^{6}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.85 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {60 \, a b \log \left (\tan \left (d x + c\right )\right ) + 30 \, b^{2} \tan \left (d x + c\right ) - \frac {60 \, a b \tan \left (d x + c\right )^{3} + 30 \, {\left (a^{2} + 2 \, b^{2}\right )} \tan \left (d x + c\right )^{4} + 15 \, a b \tan \left (d x + c\right ) + 10 \, {\left (2 \, a^{2} + b^{2}\right )} \tan \left (d x + c\right )^{2} + 6 \, a^{2}}{\tan \left (d x + c\right )^{5}}}{30 \, d} \]
[In]
[Out]
none
Time = 0.50 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.07 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {60 \, a b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 30 \, b^{2} \tan \left (d x + c\right ) - \frac {137 \, a b \tan \left (d x + c\right )^{5} + 30 \, a^{2} \tan \left (d x + c\right )^{4} + 60 \, b^{2} \tan \left (d x + c\right )^{4} + 60 \, a b \tan \left (d x + c\right )^{3} + 20 \, a^{2} \tan \left (d x + c\right )^{2} + 10 \, b^{2} \tan \left (d x + c\right )^{2} + 15 \, a b \tan \left (d x + c\right ) + 6 \, a^{2}}{\tan \left (d x + c\right )^{5}}}{30 \, d} \]
[In]
[Out]
Time = 4.95 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.88 \[ \int \csc ^6(c+d x) (a+b \tan (c+d x))^2 \, dx=\frac {b^2\,\mathrm {tan}\left (c+d\,x\right )}{d}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^4\,\left (a^2+2\,b^2\right )+\frac {a^2}{5}+{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {2\,a^2}{3}+\frac {b^2}{3}\right )+\frac {a\,b\,\mathrm {tan}\left (c+d\,x\right )}{2}+2\,a\,b\,{\mathrm {tan}\left (c+d\,x\right )}^3}{d\,{\mathrm {tan}\left (c+d\,x\right )}^5}+\frac {2\,a\,b\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{d} \]
[In]
[Out]